The present invention relates generally to technology of decoding encoded data of a picture, and more particularly relates to an improved technique of controlling allocation of storage sub-areas for frame memories, on which decoded data is stored.
The MPEG standards have been known as international digital video compression standards issued by Moving Picture Experts Group (ISO/IEC 11172 and 13818).
FIGS. 6(a) and 6(b) illustrate a typical frame data structure according to the MPEG. As shown in FIGS. 6(a) and 6(b), a group of pictures (GOP), which is an encoding unit obtained by dividing one sequence of moving pictures, consists of 15 frames in total. More specifically, one GOP is made up of one intra-frame coded picture (I-picture), four inter-frame forward predictively coded pictures (P-pictures) and ten inter-frame bidirectionally predictively coded pictures (B-pictures).
As indicated by the arrows in FIG. 6(a), the I-picture I2 is intra-frame coded, i.e., coded within its own frame. P-pictures P5 and P8 are inter-frame forward predictively coded, i.e., coded by reference to the I-picture I2 and the P-picture P5, respectively. B-pictures B0 and B1 are interframe bidirectionally predictively coded, i.e., coded by reference to a P-picture Pxe2x80x214 belonging to the previous GOP and the I-picture I2. In the same way, B-pictures B3 and B4 are also inter-frame bidirectionally predictively coded, i.e., coded by reference to the I-picture I2 and the P-picture P5.
FIG. 6(b) illustrates the order in which the respective frames (or pictures) are actually encoded. In this order of encoding, if a frame is needed to decode another frame, then the former frame is decoded earlier than the latter frame. In general, to decode encoded data of a picture that has been compressed by the MPEG, three frame memories are required. Specifically, two frame memories are needed for reference frames and one frame memory is needed for a frame to be presented (i.e., for a B-picture).
Various standards are now being set up in the field of video compression. For example, the DVD-Video format, described in DVD Specifications for Read-only Disc Part 3, complies with the MPEG standards and therefore requires three frame memories to decode a picture. On the other hand, the DVD-Audio format, detailed in DVD Specifications for Read-only Disc Part 4, also requires the use of data compressed by the MPEG standards. However, since only I-pictures are compressed in the DVD-Audio format, two frame memories are usually needed.
FIGS. 7(a), 7(b) and 7(c) illustrate how storage sub-areas may be allocated for frame memories in the prior art. Specifically, FIG. 7(a) illustrates an exemplary allocation in the DVD-Video format, in which frame memories 0 and 1 are provided for reference pictures and frame memory 2 is provided for a B-picture. FIGS. 7(b) and 7(c) illustrate two exemplary allocations in the DVD-Audio format, in which frame memories 0 and 1 are both provided for I-pictures.
FIG. 8 is a timing diagram illustrating how pictures may be stored on frame memories during normal presentation and decoding operations according to the DVD-Video format. In FIG. 8 (and FIGS. 4 and 9), SYNC-stands for a vertical synchronizing signal. As shown in FIG. 8, each I- or P-picture decoded is stored on one of the frame memories 0 and 1 on which another picture has already been stored before the I- or P-picture. On the other hand, each B-picture decoded is always stored on the frame memory 2 for a frame to be presented.
FIG. 9 is a timing diagram illustrating how pictures may be stored on frame memories during normal presentation and decoding operations according to the DVD-Audio format. As shown in FIG. 9, each I-picture decoded is stored on one of the frame memories 0 and 1 on which another picture has already been stored before the I-picture. In the example illustrated in FIG. 9, each picture is supposed to be presented for three frame intervals.
To present pictures according to multiple video compression standards while using a single picture decoding system, the storage sub-areas should be allocated for respective frame memories efficiently. This is particularly true if a single system should perform decoding in the DVD-Video and DVD-Audio formats, because the DVD-Video requires three frame memories, while the DVD-Audio needs two.
Suppose the storage sub-areas are allocated for frame memories in the DVD-Video and DVD-Audio formats as shown in FIGS. 7(a) and 7(b), respectively. In that case, if the presentation method should be changed into that complying with the DVD-Audio while a picture stored on frame memory 2 is being presented according to the DVD-Video, then the video output should be suspended or the colors presented should be temporarily changed into border colors. This is because the storage sub-area allocated for the frame memory 2 in the DVD-Video is not reserved for frame memories in the DVD-Audio. Anyway, the presentation of decoded data discontinues when the presentation methods are changed.
If storage sub-areas are allocated for the frame memories as shown in FIG. 7(c) in presenting pictures according to the DVD-Audio, then the above problem can be solved. However, in that case, the remaining storage sub-area, which is not reserved for the frame memories, must be divided into two sub-areas 61 and 62 while pictures are presented by the DVD-Audio. That is to say, a continuous storage sub-area cannot be reserved, thus making it difficult to control the memories. Naturally, though, these problems are avoidable if a memory with a huge storage capacity is used. Nevertheless, the overall circuit size, cost or power dissipation should increase with such a memory.
It is therefore an object of the present invention to prevent a decoded picture from being presented discontinuously while the presentation methods are changed without using a memory with a huge storage capacity.
Another object of the present invention is to reserve a part of the storage area, other than the sub-areas allocated for frame memories, as a continuous area.
Specifically, an inventive decoding apparatus is adapted to present encoded data of a picture. The apparatus includes: means for decoding input encoded data of the picture; means for storing the decoded data, output from the decoding means, thereon so that the decoded data will be presented or used for decoding encoded data of another picture; means for allocating part of a storage area of the storage means for a frame memory on which the decoded data should be stored; and means for recognizing a presentation method for the decoded data and, if the presentation method has been changed into a new presentation method, for setting the number of frame memories as required by the new presentation method. If the presentation methods have been changed, the allocating means allocates the same number of sub-areas of the storage area as that set by the recognizing means for the frame memories such that the sub-area previously allocated for the frame memory, on which the decoded data being presented is stored, is included in the sub-areas newly allocated.
According to the present invention, if the presentation methods have been changed, the allocating means allocates the same number of sub-areas of the storage area as that set by the recognizing means for the frame memories such that the sub-area previously allocated for the frame memory, on which the decoded data being presented is stored, is included in the sub-areas newly allocated. Thus, even if the newly selected presentation method needs a different number of frame memories, the decoded data, which has been presented until just before the change, can be presented continuously and seamlessly.
In one embodiment of the present invention, before and after the presentation methods are changed, the decoded data is preferably presented continuously.
In another embodiment of the present invention, the presentation methods interchangeable may include at least a presentation method requiring three frame memories and a presentation method requiring two frame memories.
In still another embodiment, the allocating means preferably allocates two sub-areas, which are located at the beginning and at the end of a predetermined part of the storage area, respectively, for the frame memories such that a remaining sub-area of the predetermined part of the storage area, other than those allocated for the frame memories, is continuous. In such an embodiment, the remaining sub-area of the predetermined part of the storage area, other than those allocated for the frame memories, can be reserved as a continuous area. Accordingly, the storage means can be controlled more easily.
An inventive decoding method is adapted to present encoded data of a picture. The method includes the steps of: a) decoding input encoded data of the picture; b) storing the decoded data on storage means so that the decoded data will be presented or used for decoding encoded data of another picture; c) allocating part of a storage area of the storage means for a frame memory on which the decoded data should be stored; and d) recognizing a presentation method for the decoded data and, if the presentation method has been changed into a new presentation method, setting the number of frame memories as required by the new presentation method. If the presentation methods have been changed, the same number of sub-areas of the storage area as that set in the step d) are allocated in the step c) for the frame memories such that the sub-area previously allocated for the frame memory, on which the decoded data being presented is stored, is included in the sub-areas newly allocated.
According to the present invention, if the presentation methods have been changed, the same number of sub-areas of the storage area as that set in the step d) are allocated for the frame memories such that the sub-area previously allocated for the frame memory, on which the decoded data being presented is stored, is included in the sub-areas newly allocated. Thus, even if the newly selected presentation method needs a different number of frame memories, the decoded data, which has been presented until just before the change, can be presented continuously and seamlessly.
In one embodiment of the present invention, two sub-areas, which are located at the beginning and at the end of a predetermined part of the storage area, respectively, are allocated in the step c) for the frame memories such that a remaining sub-area of the predetermined part of the storage area, other than those allocated for the frame memories, is continuous. In such an embodiment, the remaining sub-area of the predetermined part of the storage area, other than those allocated for the frame memories, can be reserved as a continuous area. Accordingly, the storage means can be controlled more easily.